//
//  KFDFAQViewModel.m
//  KFD
//
//  Created by JIRENTIANXIANG on 7/5/15.
//  Copyright © 2015 kfd. All rights reserved.
//

#import "KFDFAQViewModel.h"
#import "KFDClient.h"

@implementation KFDFAQViewModel

-(void)loadFaqsWithCompletionHandler:(KFDViewModelLoadDataCompletionHandler)completionHandler
{
    KFDClient* client=[KFDClient sharedClient];
    [client getFAQsWithSuccessHandler:^(NSArray *faqs) {
        self.faqs=faqs;
        if (completionHandler) {
            completionHandler(YES);
        }
    } failureHandler:^(KFDResponseBody *response) {
        if (completionHandler) {
            completionHandler(NO);
        }
    }];
}

@end
